[SPARK-41165][SPARK-41184][CONNECT] Fix arrow collect (again) and reenable tests.#38720
Closed
hvanhovell wants to merge 2 commits intoapache:masterfrom
Closed
[SPARK-41165][SPARK-41184][CONNECT] Fix arrow collect (again) and reenable tests.#38720hvanhovell wants to merge 2 commits intoapache:masterfrom
hvanhovell wants to merge 2 commits intoapache:masterfrom
Conversation
Contributor
grundprinzip
left a comment
There was a problem hiding this comment.
I will let others approve that have more knowledge of the internals of the collectors and their exception behavior.
| result.get | ||
| } else if (NonFatal(error)) { | ||
| responseObserver.onError(error) | ||
| logError("Error while processing query.", error) |
Contributor
There was a problem hiding this comment.
In theory, logging first then responding might be better in case something goes wrong and onError would throw.
beliefer
pushed a commit
to beliefer/spark
that referenced
this pull request
Dec 15, 2022
… implementation to stream from server to client ### What changes were proposed in this pull request? This PR proposes an optimized Arrow-based collect, that is virtually apache#38720 that implements the logics except a couple of nits. ### Why are the changes needed? To stream the Arrow batch from the server to the client side instead of waiting all the jobs to finish. ### Does this PR introduce _any_ user-facing change? No, this feature isn't released yet. ### How was this patch tested? Unittest added. Closes apache#38720 Closes apache#38759 from HyukjinKwon/SPARK-41165-followup. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Herman van Hovell <herman@databricks.com>
beliefer
pushed a commit
to beliefer/spark
that referenced
this pull request
Dec 18, 2022
… implementation to stream from server to client ### What changes were proposed in this pull request? This PR proposes an optimized Arrow-based collect, that is virtually apache#38720 that implements the logics except a couple of nits. ### Why are the changes needed? To stream the Arrow batch from the server to the client side instead of waiting all the jobs to finish. ### Does this PR introduce _any_ user-facing change? No, this feature isn't released yet. ### How was this patch tested? Unittest added. Closes apache#38720 Closes apache#38759 from HyukjinKwon/SPARK-41165-followup. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Herman van Hovell <herman@databricks.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
The arrow collect code path for connect contains a bug where it would always fall back to JSON. This was caused by the assumption that
NonFatal(e)does not match nulls, it unfortunately does. This has been fixed by doing explicit null checks and by reordering the checks inSparkConnectStreamHandler.processAsArrowBatches.Why are the changes needed?
The previous code had a bug and would always fallback to JSON.
Does this PR introduce any user-facing change?
No
How was this patch tested?
I added a new test, and I re-enabled the python test disabled in SPARK-41184.